package com.mxpio.erp.common.quality.service;

import com.mxpio.erp.common.quality.entity.InspectionScheme;
import com.mxpio.erp.common.quality.entity.InspectionSchemeChain;
import com.mxpio.erp.common.technology.entity.Item;
import com.mxpio.erp.common.technology.entity.ItemGroup;
import com.mxpioframework.common.vo.Result;
import com.mxpioframework.jpa.query.Criteria;
import com.mxpioframework.system.service.BaseService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


public interface InspectionSchemeChainService extends BaseService<InspectionSchemeChain> {

    /*@Transactional(readOnly = true)
    Page<InspectionScheme> pageByScheme(Pageable pageAble, Criteria c);*/

    Page<Item> pageByItem( String busiType,Pageable pageAble, Criteria c);

    int removeByScheme(String schemeCode, Object[] itemCode,String dataScope);

    int removeByItem(String itemCode, Object[] schemeCode);

    Page<Item> withoutItemByScheme(String busiType, Pageable pageAble, Criteria c);

    Page<Item> getItemPageFromSchemeCode(Pageable pageAble, String schemeCode);

    Page<ItemGroup> getItemGroupPageFromSchemeCode(Pageable pageAble, String schemeCode);

    Page<ItemGroup> withoutItemGroupByScheme(String busiType, Pageable pageAble, Criteria c);

    Page<ItemGroup> pageByItemGroup(String busiType, Pageable pageAble, Criteria c);

    Result<List<InspectionScheme>> getSchemeListByPath(String code, String dataScope);

    int removeBySchemeCode(String schemeCode);
}
